package com.example.football.controller;


import com.example.football.pojo.*;
import com.example.football.service.PeopleServiceImpl;
import com.example.football.service.ScheduleServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AppScheduleController {
    @Autowired
    private ScheduleServiceImpl scheduleService;

    @PostMapping("/APPschedule")
    public Result schedule(@RequestBody Peopleliketeam peopleid){
        return scheduleService.showSchedule(peopleid);
    }

    @PostMapping("/APPpeopleschedule")
    public Result peopleschedule(@RequestBody People id){
        return scheduleService.showPeopleSchedule(id);
    }

    @PostMapping("/APPpeoplescheduleid")
    public Result peoplescheduleid(@RequestBody Peopleschedule peopleschedule){
        return scheduleService.findPeopleSchedule(peopleschedule);
    }

    @PostMapping("/APPdeletepeopleschedule")
    public Result deletepeopleschedule(@RequestBody Peopleschedule id){
        return scheduleService.deletePeopschedule(id);
    }

    @PostMapping("/APPinsertpeopleschedule")
    public Result insertpeopleschedule(@RequestBody Peopleschedule id){
        return scheduleService.insertPeopleschedule(id);
    }

    @PostMapping("/APPfindschedulebyleague")
    public Result findschedulebyleague(@RequestBody Schedule schedule){
        return scheduleService.showScheduleByleague(schedule);
    }
}
